package com.hoshiicloud.stock.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.hoshiicloud.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 仓库表实体
 *
 * @author : yangcheng
 * @date : 2019/4/30 10:36
 * @mail : maiboyc@163.com
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Warehouse implements Serializable {


    private static final long serialVersionUID = 1857877067979178967L;
    private Long id;

    // 租户ID
    @NotNull(message = "租户ID不能为空")
    @ApiModelProperty(name = "companyid", value = "租户ID", required = true, dataType = "java.lang.Long", example = "3171776001692663893")
    private Long companyid;

    // 平台ID
    @ApiModelProperty(name = "platformid", value = "平台ID", dataType = "java.lang.Long", example = "3189609977215975479")
    private Long platformid;

    // 店铺ID
    @ApiModelProperty(name = "storeid", value = "店铺ID", dataType = "java.lang.Long", example = "3171776001692664000")
    private Long storeid;

    // 供应商id
    @ApiModelProperty(name = "vendorid", value = "供应商id", dataType = "java.lang.Long", example = "3171776001692664000")
    private Long vendorid;

    // 仓库代码
    @NotNull(message = "仓库代码不能为空")
    @ApiModelProperty(name = "whcode", value = "仓库代码", required = true, dataType = "java.lang.String", example = "W0001")
    private String whcode;

    // 省份
    @NotNull(message = "省份不能为空")
    @ApiModelProperty(name = "province", value = "省份", required = true, dataType = "java.lang.Long", example = "1001")
    private Long province;

    // 省份名称
    @NotNull(message = "省份名称不能为空")
    @ApiModelProperty(name = "provinceName", value = "省份名称", required = true, dataType = "java.lang.String", example = "广东省")
    private String provinceName;

    // 城市
    @NotNull(message = "城市不能为空")
    @ApiModelProperty(name = "city", value = "城市", required = true, dataType = "java.lang.Long", example = "100101")
    private Long city;

    // 城市名称
    @NotNull(message = "城市名称不能为空")
    @ApiModelProperty(name = "cityName", value = "城市名称", required = true, dataType = "java.lang.String", example = "广州市")
    private String cityName;

    // 地区
    @NotNull(message = "地区不能为空")
    @ApiModelProperty(name = "district", value = "地区", required = true, dataType = "java.lang.Long", example = "10010101")
    private Long district;

    // 地区名称
    @NotNull(message = "地区名称不能为空")
    @ApiModelProperty(name = "districtName", value = "地区名称", required = true, dataType = "java.lang.String", example = "天河区")
    private String districtName;

    // 仓库地址
    @NotNull(message = "仓库地址不能为空")
    @ApiModelProperty(name = "address", value = "仓库地址", required = true, dataType = "java.lang.String", example = "福建省福州市马尾区世创大厦3楼")
    private String address;

    // 联系电话
    @NotNull(message = "联系电话不能为空")
    //@Telephone(message = "请输入正确的电话号码")
    @ApiModelProperty(name = "telphone", value = "联系电话", required = true, dataType = "java.lang.String", example = "0591-8888888")
    private String telphone;

    // 负责人
    @NotNull(message = "负责人不能为空")
    @ApiModelProperty(name = "charge", value = "负责人", required = true, dataType = "java.lang.String", example = "廖文雄")
    private String charge;

    // 仓库类别  1-租户仓库 2-租户供应商仓库 3-平台仓库 4-平台供应商仓库 5-店铺仓库 6-店铺供应商仓库
    @NotNull(message = "仓库类别不能为空")
    @ApiModelProperty(name = "type", value = "仓库类别", required = true, dataType = "java.lang.Integer", example = "1")
    private Integer type;

    // 伙伴仓库代码
    @ApiModelProperty(name = "partnercode", value = "伙伴仓库代码", dataType = "java.lang.String", example = "W0002")
    private String partnercode;

    // 备注
    @ApiModelProperty(name = "remark", value = "备注", dataType = "java.lang.Long", example = "3171776001692664000")
    private String remark;

    @TableField("createdtime")
    @ApiModelProperty(name = "createdTime", value = "创建时间", required = true, dataType = "java.util.Date", example = "2019-05-04 10:08:35", hidden = true)
    private LocalDateTime createdTime;

    @TableField("createdby")
    @ApiModelProperty(name = "createdBy", value = "创建人", required = true, dataType = "java.lang.String", example = "admin", hidden = true)
    private String createdBy;

    @TableField("updatedtime")
    @ApiModelProperty(value = "修改时间",hidden = true)
    private LocalDateTime updatedTime;

    @TableField("updateby")
    @ApiModelProperty(value = "修改人",hidden =true)
    private String updatedBy;

    @ApiModelProperty(value = "是否删除",hidden =true)
    private Integer deleted;

    // 仓库名称
    @NotNull(message = "仓库名称不能为空")
    @ApiModelProperty(name = "whname", value = "仓库名称", required = true, dataType = "java.lang.String", example = "仓库名称")
    private String whname;

}
